package pCloud.message;

import java.io.Serializable;

//Message obtained from processing data stream obligations
//Contains : URI of the stream of format : sb://IP:PORT/CONTAINER_ID
//Contains : Merging Warning Information if any
//Contains : time to send the query graph to streamengine


public class StreamServerReply implements Serializable{
	
	public static final int REPLY = 1;
	
	public String URI;
	public String warning;
	public String ErrorFromSB;
	public double qgtime; // time to generate ssql;
	public double sbtime; // time to send qg to streambase;
	public double pdptime; // time to make ac decision;
	
	
	public StreamServerReply() {
		this.URI = "N.A.";
		this.warning = "N.A.";
		this.ErrorFromSB = "N.A.";
		this.qgtime=0;
		this.sbtime=0;
		this.pdptime=0;
		
	}
	
	public String toString(){
		
		String reply = "";
		
		reply = "Stream Handle URI : " + this.URI + "\n";
		reply += "Warning : " + this.warning + "\n";
		reply += "Error : " + this.ErrorFromSB + "\n";
		reply += this.pdptime + ":" + this.qgtime + ":" + this.sbtime + "\n";
		return reply;
	}
}
